﻿@model WebTV_Kickstarter.Gebruiker

@{
    ViewBag.Title = "Bewerk";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Bewerk</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>Gebruiker</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.Id)

        <div class="form-group">
            @Html.Label("Naam", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Adres", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Adress)
                @Html.ValidationMessageFor(model => model.Adress)
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Plaats", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Place)
                @Html.ValidationMessageFor(model => model.Place)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Email, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Email)
                @Html.ValidationMessageFor(model => model.Email)
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Bedrijf", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Company)
                @Html.ValidationMessageFor(model => model.Company)
            </div>
        </div>
        
        <div class="form-group">
            @Html.HiddenFor(model => model.Wachtwoord, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.HiddenFor(model => model.Wachtwoord)
                @Html.ValidationMessageFor(model => model.Wachtwoord)
            </div>
        </div>

        @{
            if (ViewBag.isAdmin)
            {
        <div class="form-group">
            @Html.Label("Gedoneerd", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.TotalDonated)
                @Html.ValidationMessageFor(model => model.TotalDonated)
            </div>
        </div>

        <div class="form-group">
            @Html.Label("Admin", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.isAdmin)
                @Html.ValidationMessageFor(model => model.isAdmin)
            </div>
        </div>
        }
        }

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Opslaan" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Terug", "Index")
</div>
